import request from "@/utils/request";

import type {
  RequestLoginParamsType,
  RequestLoginReturnType,
  RequestUserInfoReturnType,
} from "./interface";

// 登录
export const requestLogin = (loginParams: RequestLoginParamsType) => {
  return request.post<any, RequestLoginReturnType>(
    "/admin/acl/index/login",
    loginParams
  );
};

// 获取用户信息
export const requestUserInfo = () => {
  return request.get<any, RequestUserInfoReturnType>("/admin/acl/index/info");
};

// 退出登录
export const requestLogout = () => {
  return request.post<any, {}>("/admin/acl/index/logout");
};
